import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../core/viewmodel/language_view_model.dart';

class ChangeLanguage extends StatelessWidget {
  final Widget child;

  const ChangeLanguage({super.key, required this.child});

  @override
  Widget build(BuildContext context) {
    return Obx(() => Localizations.override(
          context: context,
          locale: Get.find<LanguageViewModel>().locale.value,
          child: child,
        ));
  }
}
